﻿
using Honeywell.DataCollection.Decoding;
using Honeywell.DataCollection.WinCE.Decoding;

namespace OpenNETCF
{
    public class HoneywellSymbologyConfig : CompatibleSymbologyConfig
    {
        private SymbologyConfig m_config;

        public HoneywellSymbologyConfig(SymID symId)
        {
            m_config = new SymbologyConfig((Honeywell.DataCollection.Decoding.SymID)symId);
        }

        public override SymFlags flags
        {
            get { return (SymFlags) m_config.flags; }
            set { m_config.flags = (Honeywell.DataCollection.Decoding.SymFlags) value; }
        }

        public override BitMask mask
        {
            get { return (BitMask)m_config.mask; }
            set { m_config.mask = (Honeywell.DataCollection.Decoding.BitMask)value; }
        }

        public override int maxLength
        {
            get { return m_config.maxLength; }
            set { m_config.maxLength = value; }
        }

        public override int minLength
        {
            get { return m_config.minLength; }
            set { m_config.minLength = value; }
        }

        public override ConfigType symConfigType
        {
            get { return (ConfigType)m_config.symConfigType; }
        }

        public override SymID symId        
        {
            get { return (SymID)m_config.symId; }
        }


        public override void Dispose()
        {
            m_config.Dispose();
        }

        public override void GetMinMaxRange(ref int min, ref int max)
        {
            m_config.GetMinMaxRange(ref min, ref max);
        }

        public override void ReadConfig(SetupType setType)
        {
            m_config.ReadConfig((Honeywell.DataCollection.Decoding.SetupType)setType);
        }

        public override void SetToDefaults()
        {
            m_config.SetToDefaults();
        }

        public override void WriteConfig()
        {
            m_config.WriteConfig();
        }
    }
}
